From: Carlos Garnacho Date: Fri, 29 Oct 2021 14:41:55 +0000 (+0200) Subject: inputMethod: Equate empty preedit string to null X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~536^2^2~102 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=286cfdc6d48dc4315df54d29d7d16b5198d92a56;p=gnome-shell.git inputMethod: Equate empty preedit string to null If we get '' from the IM as the preedit string, it is pretty safe to handle it as "no preedit" altogether. Part-of: --- diff --git a/js/misc/inputMethod.js b/js/misc/inputMethod.js index 1f9eaee7a..7de7540d3 100644 --- a/js/misc/inputMethod.js +++ b/js/misc/inputMethod.js @@ -111,6 +111,8 @@ class InputMethod extends Clutter.InputMethod { return; let preedit = text.get_text(); + if (preedit === '') + preedit = null; if (visible) this.set_preedit_text(preedit, pos, mode);